package com.smallkingson.ylib.view.listener;

import android.graphics.Paint;
import android.view.View;

import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

/**
 * Created by Administrator on 2016/1/24.
 */
public abstract class YParamsOnClickListener<T> implements View.OnClickListener {

    Map<String, T> params = new HashMap<>();

    @Override
    public void onClick(View v) {

        onClick(v, params);
    }

    public YParamsOnClickListener put(String key, T t) {
        params.put(key, t);
        return this;
    }

    public YParamsOnClickListener remove(String key) {
        params.remove(key);
        return this;
    }

    protected abstract void onClick(View v, Map<String, T> params);

}
